#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>

typedef struct MaxHeap {
    int size;
    int capacity;
    int nodes[1001];
} MaxHeap;

void insert(MaxHeap *heap, int value);

void siftUp(MaxHeap *heap, int index);
void recursiveSiftUp(MaxHeap *heap, int index);

void swap(MaxHeap *heap, int indexA, int indexB);

void printData(MaxHeap* heap);

int getMax(MaxHeap *heap);

int getSize(MaxHeap *heap);

bool isEmpty(MaxHeap *heap);

int extractMax(MaxHeap *heap);

void removeNode(MaxHeap *heap, int index);

void siftDown(MaxHeap *heap, int index);
void siftDownV2(int *numbers, int count, int index);

void heapify(int* numbers, int count);